#include "stdafx.h"
#include "HLUtility.h"


HLCAO::hlTimeCounter::hlTimeCounter( void )
{
	LARGE_INTEGER tmp;
	QueryPerformanceFrequency(&tmp);
	_freq = tmp.QuadPart;
	costTime = 0;
}

HLCAO::hlTimeCounter::~hlTimeCounter( void )
{
}

void HLCAO::hlTimeCounter::Start()
{
	QueryPerformanceCounter(&_begin);
}

void HLCAO::hlTimeCounter::End()
{
	QueryPerformanceCounter(&_end);
	costTime = ((_end.QuadPart - _begin.QuadPart)*1.0f / _freq);
}

void HLCAO::hlTimeCounter::Reset()
{
   costTime = 0;
}

float HLCAO::hlTimeCounter::getElapseTime()
{
	return costTime;
}
